﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<div class="modal-dialog x-modal-dialog" style="width: 650px;">

  <div class="modal-content">

    <div class="modal-header x-breadcrumb no-bottom-border clearfix">

      <h2><i class="glyphicon glyphicon-fire" title="编辑链接"></i>&nbsp;&nbsp;<span>编辑链接&nbsp;-&nbsp;基本信息</span></h2>

      <button type="button" class="close" data-dismiss="modal">&times;</button>

    </div>
    
    <form id="link-edit-form" class="form-horizontal" method="POST" action="${ctx.host}/webpages/${webpageId }/links/${link.id}" data-validate="true">

      <input type="hidden" name="_method" value="PATCH" />
      <input type="hidden" name="linkId" value="${linkId}" />


      <div class="modal-body">

        <div class="form-horizontal bottom-margin-20">
                
          <div class="form-group x-form-group">
            <label class="control-label col-xs-4">所在页面：</label>
            <div class="col-xs-6 pull-left">
              <p class="form-control-static">${link.webpage.name }</p>
            </div>
          </div>
          
          <div class="form-group x-form-group">
            <label class="control-label col-xs-4">链接别名：</label>
            <div class="col-xs-6 pull-left">
              <p class="form-control-static">${link.alias }</p>
            </div>
          </div>
            
          <div class="form-group x-form-group">
            <label class="control-label col-xs-4">创建时间：</label>
            <div class="col-xs-6 pull-left">
              <p class="form-control-static">
                <fmt:formatDate value="${link.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
              </p>
            </div>
          </div>
          
          <div class="form-group x-form-group">
            <label class="control-label col-xs-4">链接地址：</label>
            <div class="col-xs-6 pull-left">
              <input name="address" type="text" class="form-control" value="${link.address}" data-validate="required|www"/>
            </div>
          </div>
          
        </div>
        
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">取消</button>
      </div>
        
    </form>
    
  </div>
</div>
